package com.geek.factory.entity;

import java.math.BigDecimal;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import java.io.Serializable;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 合同实体类
 * </p>
 *
 * @author author
 * @since 2025-06-21
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("t_contract")
@ApiModel(value="TContract对象", description="合同信息")
public class TContract implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    @ApiModelProperty(value = "主键ID")
    private Integer id;

    @ApiModelProperty(value = "合同名称")
    @TableField("name")
    private String name;

    @ApiModelProperty(value = "合同金额")
    @TableField("amount")
    private BigDecimal amount;

    @ApiModelProperty(value = "合同类型")
    @TableField("type")
    private String type;

    @ApiModelProperty(value = "甲方")
    @TableField("party_a")
    private String partyA;

    @ApiModelProperty(value = "乙方")
    @TableField("party_b")
    private String partyB;

    @ApiModelProperty(value = "生效时间")
    @TableField("effective_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime effectiveTime;

    @ApiModelProperty(value = "终止时间")
    @TableField("termination_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime terminationTime;

    @ApiModelProperty(value = "支付方式（如：转账、现金等）")
    @TableField("pay_way")
    private String payWay;

    @ApiModelProperty(value = "支付类型（如：预付款、到货款等）")
    @TableField("pay_type")
    private String payType;

    @ApiModelProperty(value = "合同文件路径")
    @TableField("contract_file")
    private String contractFile;

    @ApiModelProperty(value = "合同状态（0：草稿，1：生效，2：终止，3：完成）")
    @TableField("status")    private Integer status;

    @ApiModelProperty(value = "创建时间")
    @TableField("create_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    @ApiModelProperty(value = "更新时间")
    @TableField("update_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;

    @ApiModelProperty(value = "备注")
    @TableField("remark")
    private String remark;

        @TableField("content")
        @ApiModelProperty(value = "合同内容")
    private String content;

    //检查组包含多个检查项，多对多关系
    @TableField(exist = false)
    private List<User> users;

}
